﻿; This file contains support for adding/changing/deleting/grabbing language strings
; Each function (issue listing, adding,etc) read the strings they need when they start


; Main GUI for changing language options, calls others as needed
;show_language_options(currentlanguage)
;{
; All gui statements (such as adding items) until "gui,1:default" will operate on gui #4
; Gui,4:Default

; Gui,1:Default
; Return
; }


; Called when adding a language
add_language(newlanguagename)
{

Return
}
; Updates a languages strings
update_language(updatedlanguagename)
{


Return
}



; Changes the default language setting in the config file (languages.ini)
set_active_language(newactivelanguagename)
{


Return
}

; Returns the name of the current active language
; Other functions don't have to read this value every time they run
get_active_language()
{

	; Refer to existing data variable
	global user_prefs

	; Get the active language (based on userpref.ini)
	active_language := ini_getvalue(user_prefs,"language","current")

	; Send it back
	Return active_language

}


; Function for grabbing strings (for GUIs)
; Why make it a separate function instead of using ini_getvalue for all the language strings?
; Less copy/paste means less mistakes, it's easier to fix/troubleshoot
get_language_string(key,language)
{


	; Access global variable containing strings
	global language_strings

	; Get the one we want
	string := ini_getvalue(language_strings,language,key)

	; Shoot the value back
	Return string

}
